
#host='localhost:8080';
host='125.88.96.19:8098';
programid_file='./programids.txt';
seriesid_file='./seriesids.txt';
userid_file='./userids.txt';
fullresult='./fullresult.txt';
simpleresult='./simpleresult.txt';

if [ -e $programid_file ]; then 
    while read line; do
        startTime=$(date +%s%N);
        curl "http://$host/RecommendationService/recommend?method=programbasedrecommend&pid=$line" >> $fullresult; 
        endTime=$(date +%s%N);
        timeConsumption=$(((endTime-startTime)/1000000));       
        printf "\n" >> $fullresult;
        echo "Time Consumption: "$timeConsumption"(ms)" >> $fullresult;
        printf "\n\n" >> $fullresult;
        echo "Timc Consumption: "$timeConsumption"(ms)">> $simpleresult;
        printf "\n" >> $simpleresult;
        sleep 1;
    done < './programids.txt';
fi
if [ -e $seriesid_file ]; then

fi
if [ -e $userid_file ]; then
        curl "http://$host/RecommendationService/recommend?method=personalizedrecommend&uid=07620244266">>$fullresult; printf "\n\n">>$result;
fi
